<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var num = parseInt(prompt("请输入一个数"));
      if (num == 1) {
        console.log("男的");
      } else {
        console.log("不是男的");
      }
      var a = prompt("请输入文字");
      if (a == "下雨了") {
        document.write("需要带伞");
      } else {
        document.write("不需要带伞");
      }
    </script>
  </body>
</html>
